package com.ele.client.editor;

import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.TextArea;
import com.github.gwtbootstrap.client.ui.TextBox;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;

public class SectionView extends Composite implements SectionPresenter.Display {

    interface DefaultUiBinder extends UiBinder<Widget, SectionView> {}
    private static DefaultUiBinder uiBinder = GWT.create(DefaultUiBinder.class);

    @UiField
    TextBox nameTextBox;
    @UiField
    TextArea ruleTextArea;
    @UiField
    Button addQuestionButton;
    @UiField
    FlowPanel questionsPlaceholder;
    @UiField
    FlowPanel wordsPanel;
    @UiField
    Button addWordButton;
    @UiField
    Button saveButton;
    @UiField
    Button prevButton;
    @UiField
    Button nextButton;

    public SectionView() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public TextBox getNameTextBox() {
        return nameTextBox;
    }

    @Override
    public TextArea getRuleTextArea() {
        return ruleTextArea;
    }

    @Override
    public Button getAddQuestionButton() {
        return addQuestionButton;
    }

    @Override
    public FlowPanel getQuestionsPlaceholder() {
        return questionsPlaceholder;
    }

    @Override
    public FlowPanel getWordsPanel() {
        return wordsPanel;
    }

    @Override
    public Button getAddWordButton() {
        return addWordButton;
    }

    @Override
    public Button getSaveButton() {
        return saveButton;
    }

    @Override
    public Button getPrevButton() {
        return prevButton;
    }

    @Override
    public Button getNextButton() {
        return nextButton;
    }
}
